/**
* @ProjectName: ShopSytem
* @Title: GetGoodList.java 
* @Package com.element5th.shop.servlet.good 
* @Description: 按照查找条件找到符合的商品列表
* @author 第五元素小组   
* @date 2012-10-26 16:41:49 
* @version V1.0   
*/
package com.element5th.shop.servlet.good;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.element5th.shop.comm.DaoFactory;
import com.element5th.shop.dao.good.IAdminGoodDao;
import com.element5th.shop.dto.BaseDto;

/**
 * Servlet implementation class ViewGoodList
 */
@WebServlet("/page/admin/page/good_list")
public class AdminGoodList extends HttpServlet {
	private static final long serialVersionUID = 1L;
       

	/**
	 * @see HttpServlet#service(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void service(HttpServletRequest request, HttpServletResponse response) 
			throws ServletException, IOException {
		String path = "/page/admin/page/goodlist.jsp";
		
		IAdminGoodDao dao = DaoFactory.getAdminGoodDao();
		
		List<BaseDto> list = dao.getGoodList();
		request.setAttribute("list", list);
		
		
		this.getServletContext().getRequestDispatcher(path).forward(request, response);
		
	}

}
